#!/usr/bin/env python
"""
plot_overlap_original.py

"""

import matplotlib.pyplot as plt
import numpy as np

# load files as averages
dt0 = np.average(np.loadtxt('overlap[dt=0].out'), 0)

#dtplus10   = np.average(np.loadtxt('overlap[dt=10].out'), 0)
#dtminus10  = np.average(np.loadtxt('overlap[dt=-10].out'), 0)
#dtplus25   = np.average(np.loadtxt('overlap[dt=25].out'), 0)
#dtminus25  = np.average(np.loadtxt('overlap[dt=-25].out'), 0)
#dtminus50  = np.average(np.loadtxt('overlap[dt=-50].out'), 0)
#dtplus50   = np.average(np.loadtxt('overlap[dt=50].out'), 0)
#dtplus100  = np.average(np.loadtxt('overlap[dt=100].out'), 0)
#dtminus100 = np.average(np.loadtxt('overlap[dt=-100].out'), 0)

# plot averages
plt.plot( dt0, 'ko-')
#plt.plot( dtplus10, 'o-')
#plt.plot( dtminus10, 'o-')
#plt.plot( dtplus25, 'o-')
#plt.plot( dtminus25, 'o-')
#plt.plot( (np.isnan(dtplus50)).choose(dtplus50, 0), 'o-')
#plt.plot( (np.isnan(dtminus50)).choose(dtminus50,0), 'ko-')
#plt.plot( (np.isnan(dtplus100)).choose(dtplus100, 0), 'o-')
#plt.plot( (np.isnan(dtminus100)).choose(dtminus100,0), 'o-')


plt.ylim(ymin=0, ymax=1.2)
plt.xlim(xmin=-0.2, xmax=9.2)
plt.title('Incomplete pattern')
plt.ylabel('Overlap with memory')
plt.xlabel('Recall step')


plt.show()
    
